package org.qjzn.test.demos.web.domain.entity;

import lombok.Data;
import java.util.List;

@Data
public class AuthorizationProductRequest {
    private List<SelectField> ultraPPAuthorizationModules; // UltraPP授权模块
    private SelectField authorizationProduct; // 授权产品
    private SelectField authorizationPurpose; // 授权目的
    private String remarks; // 备注
    private List<SelectField> adaptiveProductModules; // 自适应产品模块
    private List<SelectField> otherModules; // 其他模块
    private List<SelectField> generalProductModules; // 通用产品模块
    private List<SelectField> turbineProductModules; // 透平产品模块
    private String instanceId; // 实例 ID
    private SelectField authorizationSelectionMode; // 授权项选择模式
    private SelectField authorizationDays; // 授权天数
    private List<SelectField> pcdProductModules; // PCD产品模块
    private List<AuthorizationDetail> authorizationDetails; // 授权明细表
    private List<String> productSelections; // 产品选择
    private List<String> technicalPersonnel; // 技术人员
    private SelectField authorizationType; // 授权类型
    private int otherAuthorizationDays; // 其他授权天数
    private List<SelectField> measurementProductModules; // 测量产品模块
    private List<String> usersNames; // 使用人姓名
    private List<SelectField> detailedProductSelections; // 产品选择详细
    private String customerCompanyName; // 客户单位名称（请写全称）
    private SelectField applicantCategory; // 申请人类别

    @Data
    public static class SelectField {
        private String label;
        private String value;
    }

    @Data
    public static class AuthorizationDetail {
        private String cncSystem;
        private String machineCode;
        private String machineToolCode;
        private String linkedMachine;
        private SelectField linkedMachineDetail;
        private SelectField encryptionLock;
        private String customerName;
    }
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();

        sb.append("AuthorizationProductRequest {\n");
        sb.append("  ultraPPAuthorizationModules=").append(ultraPPAuthorizationModules).append(",\n");
        sb.append("  authorizationProduct=").append(authorizationProduct).append(",\n");
        sb.append("  authorizationPurpose=").append(authorizationPurpose).append(",\n");
        sb.append("  remarks='").append(remarks).append("',\n");
        sb.append("  adaptiveProductModules=").append(adaptiveProductModules).append(",\n");
        sb.append("  otherModules=").append(otherModules).append(",\n");
        sb.append("  generalProductModules=").append(generalProductModules).append(",\n");
        sb.append("  turbineProductModules=").append(turbineProductModules).append(",\n");
        sb.append("  instanceId='").append(instanceId).append("',\n");
        sb.append("  authorizationSelectionMode=").append(authorizationSelectionMode).append(",\n");
        sb.append("  authorizationDays=").append(authorizationDays).append(",\n");
        sb.append("  pcdProductModule=").append(pcdProductModules).append(",\n");
        sb.append("  authorizationDetails=\n");

        if (authorizationDetails != null && !authorizationDetails.isEmpty()) {
            sb.append("    [\n");
            for (AuthorizationDetail detail : authorizationDetails) {
                sb.append("      ").append(detail.toString()).append(",\n");
            }
            sb.append("    ]\n");
        } else {
            sb.append("    []\n");
        }

        sb.append("  productSelections=").append(productSelections).append(",\n");
        sb.append("  technicalPersonnel=").append(technicalPersonnel).append(",\n");
        sb.append("  authorizationType=").append(authorizationType).append(",\n");
        sb.append("  otherAuthorizationDays=").append(otherAuthorizationDays).append(",\n");
        sb.append("  measurementProductModules=").append(measurementProductModules).append(",\n");
        sb.append("  usersNames=").append(usersNames).append(",\n");
        sb.append("  detailedProductSelections=").append(detailedProductSelections).append(",\n");
        sb.append("  customerCompanyName='").append(customerCompanyName).append("',\n");
        sb.append("  applicantCategory=").append(applicantCategory).append("\n");
        sb.append("}");

        return sb.toString();
    }
}
